package com.example.administrator.slidedemo;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity {

    private List<MessageBean> mList;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initData();
        SlideListView lv = (SlideListView) findViewById(R.id.list);
        SlideAdapter adapter = new SlideAdapter(this, mList);
        lv.setAdapter(adapter);
    }

    private void initData() {
        mList = new ArrayList<MessageBean>();
        for (int i = 0; i < 100; i++){
            mList.add(new MessageBean("items" + i));

        }
    }
}
